home *** CD-ROM | disk | FTP | other *** search
/ Workplace Effectiveness:…ecision-Making Strategies / Workplace Effectiveness: Decision-Making Strategies.iso / pc / Files / Stepfar.dxr / 00134_multiply fields.ls < prev    next >
Encoding:
Text File  |  1998-12-16  |  776 b   |  24 lines

  1. property field1, field2, productfield, value
  2.  
  3. on beginSprite me
  4.   set the value of me to 0
  5. end
  6.  
  7. on enterFrame me
  8.   set X to integer(the text of field ("field" & field1))
  9.   set y to integer(the text of field ("field" & field2))
  10.   set z to X * y
  11.   if z <> the value of me then
  12.     set the value of me to z
  13.     set the text of field ("field" & productfield) to string(z)
  14.   end if
  15. end
  16.  
  17. on getPropertyDescriptionList me
  18.   set description to [:]
  19.   addProp(description, #field1, [#default: EMPTY, #format: #string, #comment: "Multiply which field:"])
  20.   addProp(description, #field2, [#default: EMPTY, #format: #string, #comment: "Multiply which field:"])
  21.   addProp(description, #productfield, [#default: EMPTY, #format: #string, #comment: "product field:"])
  22.   return description
  23. end
  24.